# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-net-whois-ip
_pkgname=Net-Whois-IP
pkgver=1.19
pkgrel=11
pkgdesc='Perl extension for looking up the whois information for ip addresses.'
arch=('any')
url='http://search.cpan.org/dist/Net-Whois-IP'
license=('GPL' 'PerlArtistic')
depends=('perl')
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/B/BS/BSCHMITZ/$_pkgname-$pkgver.tar.gz")
sha512sums=('80d1be9dc6c8e9da74df97524f1a804f6ab64f1e016509944b1ba970c2a508e46cd6d633c6cfc2e9fa5d3fc8240500f81cbc90a27bdeab26cb7b590ba97758ae')

build() {
  cd  "$_pkgname-$pkgver"

  export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
    PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
    MODULEBUILDRC=/dev/null

  perl Makefile.PL

  make
}

package() {
  cd  "$_pkgname-$pkgver"

  make install

  find $pkgdir -name '.packlist' -delete
  find $pkgdir -name '*.pod' -delete
}

